<?php

	class cct_member extends ctl_member
	{
		function cct_member(&$system)
		{
			parent::ctl_member(&$system);
			$this->map[] = array('label'=>'推广链接',
								'items'=>array(
									array('label'=>'推广链接','link'=>'promotion')
									)
								);
		}

		function promotion()
		{
			$userId = $this->member['member_id'];
			$oMember = $this->system->loadModel('member/member');
			$uname = $oMember->getFieldById($userId, array('uname'));
			$baseUrl = $this->system->getConf('store.shop_url');
			if (!$baseUrl)
			{
				$baseUrl = $this->system->base_url();
			}
			$promotionLink = $baseUrl.'#r-p'.$uname['uname'];
			$this->pagedata['promotionLink'] = $promotionLink;
			$this->_output();
		}
	}

?>